package com.imti.mall.sale.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.imti.mall.model.sms.pojo.SmsFlashPromotionSession;
import com.imti.mall.sale.dao.SmsFlashPromotionSessionDao;
import com.imti.mall.sale.service.SmsFlashPromotionSessionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class SmsFlashPromotionSessionServiceImpl extends ServiceImpl<SmsFlashPromotionSessionDao, SmsFlashPromotionSession> implements SmsFlashPromotionSessionService
{
    @Autowired
    SmsFlashPromotionSessionDao smsFlashPromotionSessionDao;
    /**
     * 查询限时购场次表
     * @return
     */
    @Override
    public List<SmsFlashPromotionSession> findSmsFlashPromotionSession() {
        return smsFlashPromotionSessionDao.selectList(null);
    }
    /**
     * 根据id删除时购场次表
     * @param id
     * @return
     */
    @Override
    public Integer delSmsFlashPromotionSession(Integer id) {
        return smsFlashPromotionSessionDao.deleteById(id);
    }
    /**
     * 根据id修改限时购场次表
     * @param smsFlashPromotionSession
     * @return
     */
    @Override
    public Integer updateSmsFlashPromotionSession(SmsFlashPromotionSession smsFlashPromotionSession) {
        return smsFlashPromotionSessionDao.updateSmsFlashPromotionSession(smsFlashPromotionSession);
    }
    /**
     * 添加限时购场次表
     * @param smsFlashPromotionSession
     * @return
     */
    @Override
    public Integer add(SmsFlashPromotionSession smsFlashPromotionSession) {
        return smsFlashPromotionSessionDao.insert(smsFlashPromotionSession);
    }
}
